import Flutter
import UIKit

public class SwiftPluginJdPassportLoginPlugin: NSObject, FlutterPlugin {
  public static func register(with registrar: FlutterPluginRegistrar) {
    let channel = FlutterMethodChannel(name: "jdfpassportlogin", binaryMessenger: registrar.messenger())
    let instance = SwiftPluginJdPassportLoginPlugin()
    registrar.addMethodCallDelegate(instance, channel: channel)
  }

  public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
    switch call.method {
    //初始化
    case "init":
        result(nil)
    //账户密码登录
    case "loginWithAccountPassword":
        result(nil)
    //发送验证码
    case "sendVerifyCode":
        result(nil)
    //验证码登录
    case "loginWithVerifyCode":
        result(nil)
    //忘记密码
    case "forgetPassword":
        result(nil)
    //京东授权登录
    case "loginWithJD":
        result(nil)
    //微信授权登录
    case "loginWithWx":
        result(nil)
    default:
        result("iOS " + UIDevice.current.systemVersion)
    }
  }
}
